\(\int \frac {c+d x^2+e x^4+f x^6}{(a+b x^2)^2} \, dx\) [127]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 118 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=\frac {(b e-2 a f) x}{b^3}+\frac {f x^3}{3 b^2}+\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac {\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}} \]

[Out]

(-2*a*f+b*e)*x/b^3+1/3*f*x^3/b^2+1/2*(c-a*(a^2*f-a*b*e+b^2*d)/b^3)*x/a/(b*x^2+a)+1/2*(5*a^3*f-3*a^2*b*e+a*b^2*
d+b^3*c)*arctan(x*b^(1/2)/a^(1/2))/a^(3/2)/b^(7/2)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1828, 1167, 211} \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=\frac {x \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}+\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (5 a^3 f-3 a^2 b e+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac {x (b e-2 a f)}{b^3}+\frac {f x^3}{3 b^2} \]

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2)^2,x]

[Out]

((b*e - 2*a*f)*x)/b^3 + (f*x^3)/(3*b^2) + ((c - (a*(b^2*d - a*b*e + a^2*f))/b^3)*x)/(2*a*(a + b*x^2)) + ((b^3*
c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(7/2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1167

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\int \frac {-\frac {b^3 c+a b^2 d-a^2 b e+a^3 f}{b^3}-\frac {2 a (b e-a f) x^2}{b^2}-\frac {2 a f x^4}{b}}{a+b x^2} \, dx}{2 a} \\ & = \frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 a (b e-2 a f)}{b^3}-\frac {2 a f x^2}{b^2}+\frac {-b^3 c-a b^2 d+3 a^2 b e-5 a^3 f}{b^3 \left (a+b x^2\right )}\right ) \, dx}{2 a} \\ & = \frac {(b e-2 a f) x}{b^3}+\frac {f x^3}{3 b^2}+\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac {\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \int \frac {1}{a+b x^2} \, dx}{2 a b^3} \\ & = \frac {(b e-2 a f) x}{b^3}+\frac {f x^3}{3 b^2}+\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac {\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.03 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=\frac {(b e-2 a f) x}{b^3}+\frac {f x^3}{3 b^2}-\frac {\left (-b^3 c+a b^2 d-a^2 b e+a^3 f\right ) x}{2 a b^3 \left (a+b x^2\right )}+\frac {\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}} \]

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2)^2,x]

[Out]

((b*e - 2*a*f)*x)/b^3 + (f*x^3)/(3*b^2) - ((-(b^3*c) + a*b^2*d - a^2*b*e + a^3*f)*x)/(2*a*b^3*(a + b*x^2)) + (
(b^3*c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(7/2))

Maple [A] (verified)

Time = 3.46 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.97

method result size
default \(-\frac {-\frac {1}{3} f \,x^{3} b +2 a f x -b e x}{b^{3}}+\frac {-\frac {\left (f \,a^{3}-a^{2} b e +a \,b^{2} d -b^{3} c \right ) x}{2 a \left (b \,x^{2}+a \right )}+\frac {\left (5 f \,a^{3}-3 a^{2} b e +a \,b^{2} d +b^{3} c \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}}{b^{3}}\) \(114\)
risch \(\frac {f \,x^{3}}{3 b^{2}}-\frac {2 a f x}{b^{3}}+\frac {e x}{b^{2}}-\frac {\left (f \,a^{3}-a^{2} b e +a \,b^{2} d -b^{3} c \right ) x}{2 a \,b^{3} \left (b \,x^{2}+a \right )}-\frac {5 a^{2} \ln \left (b x +\sqrt {-a b}\right ) f}{4 b^{3} \sqrt {-a b}}+\frac {3 a \ln \left (b x +\sqrt {-a b}\right ) e}{4 b^{2} \sqrt {-a b}}-\frac {\ln \left (b x +\sqrt {-a b}\right ) d}{4 b \sqrt {-a b}}-\frac {c \ln \left (b x +\sqrt {-a b}\right )}{4 \sqrt {-a b}\, a}+\frac {5 a^{2} \ln \left (-b x +\sqrt {-a b}\right ) f}{4 b^{3} \sqrt {-a b}}-\frac {3 a \ln \left (-b x +\sqrt {-a b}\right ) e}{4 b^{2} \sqrt {-a b}}+\frac {\ln \left (-b x +\sqrt {-a b}\right ) d}{4 b \sqrt {-a b}}+\frac {c \ln \left (-b x +\sqrt {-a b}\right )}{4 \sqrt {-a b}\, a}\) \(264\)

[In]

int((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x,method=_RETURNVERBOSE)

[Out]

-1/b^3*(-1/3*f*x^3*b+2*a*f*x-b*e*x)+1/b^3*(-1/2*(a^3*f-a^2*b*e+a*b^2*d-b^3*c)/a*x/(b*x^2+a)+1/2*(5*a^3*f-3*a^2
*b*e+a*b^2*d+b^3*c)/a/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 364, normalized size of antiderivative = 3.08 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=\left [\frac {4 \, a^{2} b^{3} f x^{5} + 4 \, {\left (3 \, a^{2} b^{3} e - 5 \, a^{3} b^{2} f\right )} x^{3} - 3 \, {\left (a b^{3} c + a^{2} b^{2} d - 3 \, a^{3} b e + 5 \, a^{4} f + {\left (b^{4} c + a b^{3} d - 3 \, a^{2} b^{2} e + 5 \, a^{3} b f\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 6 \, {\left (a b^{4} c - a^{2} b^{3} d + 3 \, a^{3} b^{2} e - 5 \, a^{4} b f\right )} x}{12 \, {\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}, \frac {2 \, a^{2} b^{3} f x^{5} + 2 \, {\left (3 \, a^{2} b^{3} e - 5 \, a^{3} b^{2} f\right )} x^{3} + 3 \, {\left (a b^{3} c + a^{2} b^{2} d - 3 \, a^{3} b e + 5 \, a^{4} f + {\left (b^{4} c + a b^{3} d - 3 \, a^{2} b^{2} e + 5 \, a^{3} b f\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 3 \, {\left (a b^{4} c - a^{2} b^{3} d + 3 \, a^{3} b^{2} e - 5 \, a^{4} b f\right )} x}{6 \, {\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}\right ] \]

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/12*(4*a^2*b^3*f*x^5 + 4*(3*a^2*b^3*e - 5*a^3*b^2*f)*x^3 - 3*(a*b^3*c + a^2*b^2*d - 3*a^3*b*e + 5*a^4*f + (b
^4*c + a*b^3*d - 3*a^2*b^2*e + 5*a^3*b*f)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) + 6*(a
*b^4*c - a^2*b^3*d + 3*a^3*b^2*e - 5*a^4*b*f)*x)/(a^2*b^5*x^2 + a^3*b^4), 1/6*(2*a^2*b^3*f*x^5 + 2*(3*a^2*b^3*
e - 5*a^3*b^2*f)*x^3 + 3*(a*b^3*c + a^2*b^2*d - 3*a^3*b*e + 5*a^4*f + (b^4*c + a*b^3*d - 3*a^2*b^2*e + 5*a^3*b
*f)*x^2)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + 3*(a*b^4*c - a^2*b^3*d + 3*a^3*b^2*e - 5*a^4*b*f)*x)/(a^2*b^5*x^2 +
 a^3*b^4)]

Sympy [A] (verification not implemented)

Time = 0.80 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.70 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=x \left (- \frac {2 a f}{b^{3}} + \frac {e}{b^{2}}\right ) + \frac {x \left (- a^{3} f + a^{2} b e - a b^{2} d + b^{3} c\right )}{2 a^{2} b^{3} + 2 a b^{4} x^{2}} - \frac {\sqrt {- \frac {1}{a^{3} b^{7}}} \cdot \left (5 a^{3} f - 3 a^{2} b e + a b^{2} d + b^{3} c\right ) \log {\left (- a^{2} b^{3} \sqrt {- \frac {1}{a^{3} b^{7}}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{3} b^{7}}} \cdot \left (5 a^{3} f - 3 a^{2} b e + a b^{2} d + b^{3} c\right ) \log {\left (a^{2} b^{3} \sqrt {- \frac {1}{a^{3} b^{7}}} + x \right )}}{4} + \frac {f x^{3}}{3 b^{2}} \]

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/(b*x**2+a)**2,x)

[Out]

x*(-2*a*f/b**3 + e/b**2) + x*(-a**3*f + a**2*b*e - a*b**2*d + b**3*c)/(2*a**2*b**3 + 2*a*b**4*x**2) - sqrt(-1/
(a**3*b**7))*(5*a**3*f - 3*a**2*b*e + a*b**2*d + b**3*c)*log(-a**2*b**3*sqrt(-1/(a**3*b**7)) + x)/4 + sqrt(-1/
(a**3*b**7))*(5*a**3*f - 3*a**2*b*e + a*b**2*d + b**3*c)*log(a**2*b**3*sqrt(-1/(a**3*b**7)) + x)/4 + f*x**3/(3
*b**2)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.99 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=\frac {{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} x}{2 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}} + \frac {b f x^{3} + 3 \, {\left (b e - 2 \, a f\right )} x}{3 \, b^{3}} + \frac {{\left (b^{3} c + a b^{2} d - 3 \, a^{2} b e + 5 \, a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{3}} \]

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/2*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x/(a*b^4*x^2 + a^2*b^3) + 1/3*(b*f*x^3 + 3*(b*e - 2*a*f)*x)/b^3 + 1/2*
(b^3*c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^3)

Giac [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.04 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=\frac {{\left (b^{3} c + a b^{2} d - 3 \, a^{2} b e + 5 \, a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{3}} + \frac {b^{3} c x - a b^{2} d x + a^{2} b e x - a^{3} f x}{2 \, {\left (b x^{2} + a\right )} a b^{3}} + \frac {b^{4} f x^{3} + 3 \, b^{4} e x - 6 \, a b^{3} f x}{3 \, b^{6}} \]

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*(b^3*c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^3) + 1/2*(b^3*c*x - a*b^2*d*x
 + a^2*b*e*x - a^3*f*x)/((b*x^2 + a)*a*b^3) + 1/3*(b^4*f*x^3 + 3*b^4*e*x - 6*a*b^3*f*x)/b^6

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.96 \[ \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx=x\,\left (\frac {e}{b^2}-\frac {2\,a\,f}{b^3}\right )+\frac {f\,x^3}{3\,b^2}+\frac {x\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{2\,a\,\left (b^4\,x^2+a\,b^3\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (5\,f\,a^3-3\,e\,a^2\,b+d\,a\,b^2+c\,b^3\right )}{2\,a^{3/2}\,b^{7/2}} \]

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2)^2,x)

[Out]

x*(e/b^2 - (2*a*f)/b^3) + (f*x^3)/(3*b^2) + (x*(b^3*c - a^3*f - a*b^2*d + a^2*b*e))/(2*a*(a*b^3 + b^4*x^2)) +
(atan((b^(1/2)*x)/a^(1/2))*(b^3*c + 5*a^3*f + a*b^2*d - 3*a^2*b*e))/(2*a^(3/2)*b^(7/2))